<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>品优购-分类</title>
  <!-- 需要引入的css -->
  <link rel="stylesheet" href="../lib/fontawesome/css/font-awesome.css">
  <link rel="stylesheet" href="../lib/mui/css/mui.css">
  <!-- 项目的公共的样式文件 scss  -->
  <link rel="stylesheet" href="../css/common.css">
  <!-- 自己页面的样式文件 scss -->
  <link rel="stylesheet" href="../css/category.css">

</head>

<body>
  <!-- 头部搜索 -->
  <header class="pyg_header">
    <div class="mui-input-row mui-search">
      <input type="search" class="mui-input-clear" placeholder="">
    </div>
  </header>
  <!-- 内容 -->
  <div class="pyg_view">
    <div class="left"></div>
    <div class="right">
    </div>
  </div>
  <!-- 尾部 -->
  <footer class="pyg_footer">
    <a href="javascript:;">
      <span class="fa fa-home"></span>
      <div>首页</div>
    </a>
    <a href="pages/category.html">
      <span class="fa fa-list-ul"></span>
      <div>分类</div>
    </a>
    <a href="javascript:;">
      <span class="fa fa-cart-plus"></span>
      <div>购物车</div>
    </a>
    <a href="javascript:;">
      <span class="fa fa-user"></span>
      <div>我的</div>
    </a>
  </footer>
</body>

<!-- 模板引擎 -->
<!-- 左侧菜单 -->
<script type="text/template" id="leftTpl">
  <ul class="left_menu">
     {{each data value index}}
     {{if index==0}}
     <li class="active" >{{value.cat_name}}</li>
     {{/if}}
     
     {{if index!=0}}
     <li>{{value.cat_name}}</li>
     {{/if}}
     {{/each}}
</ul>
 </script>
<!-- 左侧菜单 -->

<!-- 右侧内容 -->
<script type="text/template" id="rightTpl">
  <div>
     {{each data value index}}
   <!-- 二级分类 电器 大电。。 -->
   <div class="goods_item">
     <div class="goods_title">{{value.cat_name}}</div>
     <div class="goods_content">
          <ul>
               {{each value.children subValue subIndex}}
               <li>
                    <a href="presentation.html?cid={{subValue.cat_id}}">
                         <img src="http://api.pyg.ak48.xyz/{{subValue.cat_icon}}"
                              alt="">
                         <div>{{subValue.cat_name}}</div>
                    </a>
               </li>
               {{/each}}
          </ul>
     </div>
</div>
     {{/each}}
</div>
</script>
<!-- 右侧内容 -->
<!-- 模板引擎 -->
<!-- js -->
<script src="../lib/mui/js/mui.js"></script>
<!-- zepto 是我 自己定制过的！！！ 里面包含了一些常用的模块！！ 直接当做jq来使用！！！  -->
<script src="../lib/zepto/zepto.js"></script>
<script src="../lib/arttemplate/template-web.js"></script>
<!-- iscroll -->
<script src="../lib/iscroll/iscroll.js"></script>
<!-- 公共 js -->
<script src="../js/common.js"></script>
<!-- 自己 js -->
<script src="../js/category.js"></script>

</html>